#include <stdio.h>

const char EMPTY = '.';
const char WALL = '#';

int main()
{
	//const int MAX_LAB_SIZE = 33;
	//char lab[ MAX_LAB_SIZE ][ MAX_LAB_SIZE ];

	int N = 0;
	scanf( "%d", &N );

	for( int i = 0; i < N; ++i )
		for( int j = 0; j < N; ++j )
			scanf( "%c", &lab[i][j] );

	int res = 0;
	for( int i = 0; i < N; ++i )
		for( int j = 0; j < N; ++j )
		{

			const char ch = lab[i][j];

			if( i == 0 && j == 0)
				continue;
			if( i == (N-1) && j == (N-1) )
				continue;

			if( ch == EMPTY )
			{
				if( i == 0 || i == (N-1) || j == 0 || j == (N-1) )
					++res;
			}
			else
			{
				if( j > 0 && lab[i][j-1] == EMPTY)
					++res;
				if( j < (N-1) && lab[i][j+1] == EMPTY )
					++res;
				if( i > 0 && lab[i-1][j] == EMPTY )
			}
		}*/
	return 0;
}
